package com.yxw.yxnet_cd_center.common.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jdk.nashorn.internal.objects.annotations.Getter;
import lombok.Data;

import java.io.Serializable;

/**
 * @desc: DTO基类
 * @program: yxw1.0
 * @author: qlinc
 * @date: 2022-10-13 17:41:32
 */
@Data
@ApiModel(value = "BaseDTO", description = "DTO基类")
public class BaseDTO implements Serializable {


    private static final long serialVersionUID = -7400638456271424546L;
    /**
     * 唯一请求id
     */
    @ApiModelProperty(value = "唯一请求id", required = false)
//    @NotBlank(message = "唯一请求id不能为空")
    protected String requestId;


    @ApiModelProperty(value = "当前页", required = false)
    private Integer currPage;

    @ApiModelProperty(value = "每页数据条数", required = false)
    private Integer pageSize;


    @Getter
    public Integer getCurrPage() {
        return null == currPage ? 0 : currPage;
    }

    @Getter
    public Integer getPageSize() {
        return null == pageSize ? 10 : pageSize;
    }
}

